﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TankGameV1._0.Properties;

namespace TankGameV1._0
{
    class Boom:GameObject
    {
        private Image[] images =
        {
            Resources.blast1,
            Resources.blast2,
            Resources.blast3,
            Resources.blast4,
            Resources.blast5,
            Resources.blast6,
            Resources.blast7,
            Resources.blast8
        };
        public Boom(int x,int y) : base(x, y) { }

        public override void Draw(Graphics g)
        {
            for(int i = 0; i < images.Length; i++)
            {
                g.DrawImage(images[i], this.X, this.Y);
            }
            //爆炸显示完之后就应该清除
            SingleObject.GetObject().RemoveObject(this);
        }
    }
}
